home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
CUGUK
/
PC_LIBS
/
C045.ZIP
/
BTREE.ARC
/
GETKEY.H
< prev
next >
Wrap
Text File
|
1989-02-08
|
1KB
|
31 lines
int nextkey (indexfile * nxp, char * key);
/*
* On entry, nxp points to an indexfile, key points to the
* location where the next key will be stored. Nextkey
* returns the record number of the data item associated
* with the next key. If the datafile is empty, NULL is returned.
* If current record is the largest, then the first record is
* returned.
*/
int prevkey (indexfile *, char *);
/*
* Similar to nextkey.
*/
int tafindkey (indexfile * nxp, char * key);
/*
* Searches for 'key' of the indexfile to which nxp points.
* Returns the record number of the data item if found. Else
* returns NULL. Note: will always return NULL is dupsallowed.
*/
int findkey (indexfile * nxp, char * key);
/*
* Same as tafindkey except it will return the record number
* of the first data item found even if dupsallowed.
*/
int searchkey (indexfile * nxp, char * key);
/*
* Searches for the data item with 'key' in indexfile * nxp.
* Returns its pageref if found, or returns the pageref of
* the successor of its would-be predecessor.
*/